            
/*
 * DesktopApplication1View.java
 */
package desktopapplication1;
import java.awt.Toolkit;
import bean.ConsultaCita;
import fachada.FachadaCita;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import java.sql.Date;
import java.util.Vector;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;
import app.Com;
import app.Parameters;
import bean.CaracteristicasConsulta;
import bean.Consulta;
import bean.Usuario;
import fachada.FachadaConsulta;
import fachada.FachadaFisico1;
import fachada.FachadaFisico2;
import java.awt.Color;
import java.math.BigDecimal;
import java.math.BigInteger;

/**
 * The application's main frame.
 */
public class DesktopApplication1View extends FrameView {

    Calendar calendario = Calendar.getInstance();
    ArrayList<ConsultaCita> pacientesxDia = new ArrayList<ConsultaCita>();
    //instanciar puerto
    Com com;
    int evaluacion;
    public String idPull;
    public String idEvaluacionPaciente;

    public DesktopApplication1View(SingleFrameApplication app) {
        super(app);
        initComponents();
        //inicializo lo miooo
        ponerFecha();
        jTabbedPane1.setSelectedIndex(ddPruebas.getSelectedIndex());

        Dispositivo oDispositivo = new Dispositivo();
        ddPuerto.setModel(new javax.swing.DefaultComboBoxModel(oDispositivo.getPuertosLibres()));

//        verConsultas();
        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {

            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(true);
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                    progressBar.setVisible(false);
                    progressBar.setValue(0);
                } else if ("message".equals(propertyName)) {
                    String text = (String) (evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer) (evt.getNewValue());
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(false);
                    progressBar.setValue(value);
                }
            }
        });
    }

    @Action
    public void showAboutBox() {
        if (aboutBox == null) {
            JFrame mainFrame = DesktopApplication1.getApplication().getMainFrame();
            aboutBox = new DesktopApplication1AboutBox(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        }
        DesktopApplication1.getApplication().show(aboutBox);
    }

    private boolean IngresarConsulta() {
        boolean retorno = false;
        Consulta oConsulta = new Consulta();
        java.util.Date now = new java.util.Date();
        java.sql.Date sysdate = new java.sql.Date(now.getTime());
        oConsulta.setFecha(sysdate);
        Usuario uPaciente = new Usuario();
        Usuario uEspecialista = new Usuario();
        uEspecialista.setIdUsuario(txtCedula.getText());
        uPaciente.setIdUsuario(txtParticipante.getText());
        oConsulta.setIdEspecialista(uEspecialista);
        oConsulta.setIdPaciente(uPaciente);
        oConsulta.setNroEvaluacion(new BigDecimal(evaluacion));
        oConsulta.setIdPull(idPull);
        oConsulta.setIdEvaluacionPaciente(idEvaluacionPaciente);
        FachadaConsulta oFachadaConsulta = new FachadaConsulta();
        String sResultado = oFachadaConsulta.insertarConsulta(oConsulta);
        if (sResultado == null) {
            retorno = true;
        } else {
            lblError.setText("No se inserto la consulta " + sResultado);
        }

        return retorno;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tableConsultas = new javax.swing.JTable();
        ddTurnos = new javax.swing.JComboBox();
        jButton3 = new javax.swing.JButton();
        txtEnsayo = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        txtCedula = new javax.swing.JTextField();
        txtPull = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        txttricepsder = new javax.swing.JTextField();
        txtbicepsder = new javax.swing.JTextField();
        txtCuadricepsDer = new javax.swing.JTextField();
        txtIzquiotibialDer = new javax.swing.JTextField();
        txttriceptsizq = new javax.swing.JTextField();
        txtbicepsizq = new javax.swing.JTextField();
        txtCuadricepsIzq = new javax.swing.JTextField();
        txtIzquiotibialIzq = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        btnFuerza = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        txtAltura = new javax.swing.JTextField();
        txtBrazoExtendido = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        txtSalto = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        txtReaccion = new javax.swing.JTextField();
        btnSaltabilidad = new javax.swing.JButton();
        jLabel21 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        btnVelocidad = new javax.swing.JButton();
        txt10Metros = new javax.swing.JTextField();
        txt20Metros = new javax.swing.JTextField();
        txt30Metros = new javax.swing.JTextField();
        txt50Metros = new javax.swing.JTextField();
        txt40Metros = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        habilitadocono2 = new javax.swing.JCheckBox();
        habilitadocono3 = new javax.swing.JCheckBox();
        habilitadocono4 = new javax.swing.JCheckBox();
        jButton4 = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        habilitadocono1 = new javax.swing.JCheckBox();
        jLabel36 = new javax.swing.JLabel();
        distanciacono1 = new javax.swing.JTextField();
        distanciacono2 = new javax.swing.JTextField();
        distanciacono3 = new javax.swing.JTextField();
        distanciacono4 = new javax.swing.JTextField();
        distanciacono5 = new javax.swing.JTextField();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        ddPruebas = new javax.swing.JComboBox();
        jLabel7 = new javax.swing.JLabel();
        txtParticipante = new javax.swing.JLabel();
        txtNombreParticipante = new javax.swing.JLabel();
        ddPuerto = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        jButton5 = new javax.swing.JButton();
        txtParticipante1 = new javax.swing.JLabel();
        lblError = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(desktopapplication1.DesktopApplication1.class).getContext().getResourceMap(DesktopApplication1View.class);
        mainPanel.setBackground(resourceMap.getColor("mainPanel.background")); // NOI18N
        mainPanel.setName("mainPanel"); // NOI18N

        jScrollPane1.setBackground(resourceMap.getColor("jScrollPane1.background")); // NOI18N
        jScrollPane1.setName("jScrollPane1"); // NOI18N

        tableConsultas.setBackground(resourceMap.getColor("tableConsultas.background")); // NOI18N
        tableConsultas.setForeground(resourceMap.getColor("tableConsultas.foreground")); // NOI18N
        tableConsultas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Identificación", "Apellido", "Nombres", "Institución", "Pull", "Evaluacion"
            }
        ));
        tableConsultas.setName("tableConsultas"); // NOI18N
        jScrollPane1.setViewportView(tableConsultas);
        tableConsultas.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("tableConsultas.columnModel.title3")); // NOI18N
        tableConsultas.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("tableConsultas.columnModel.title0")); // NOI18N
        tableConsultas.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("tableConsultas.columnModel.title1")); // NOI18N
        tableConsultas.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("tableConsultas.columnModel.title2")); // NOI18N
        tableConsultas.getColumnModel().getColumn(4).setMinWidth(0);
        tableConsultas.getColumnModel().getColumn(4).setMaxWidth(0);
        tableConsultas.getColumnModel().getColumn(4).setHeaderValue(resourceMap.getString("tableConsultas.columnModel.title4")); // NOI18N
        tableConsultas.getColumnModel().getColumn(5).setMinWidth(0);
        tableConsultas.getColumnModel().getColumn(5).setMaxWidth(0);
        tableConsultas.getColumnModel().getColumn(5).setHeaderValue(resourceMap.getString("tableConsultas.columnModel.title5")); // NOI18N

        ddTurnos.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", " " }));
        ddTurnos.setName("ddTurnos"); // NOI18N

        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        txtEnsayo.setEditable(false);
        txtEnsayo.setName("txtEnsayo"); // NOI18N

        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        txtCedula.setText(resourceMap.getString("txtName.text")); // NOI18N
        txtCedula.setName("txtName"); // NOI18N

        txtPull.setText(resourceMap.getString("txtPull.text")); // NOI18N
        txtPull.setName("txtPull"); // NOI18N

        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel3.setBackground(resourceMap.getColor("jPanel3.background")); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N

        jLabel8.setIcon(resourceMap.getIcon("jLabel8.icon")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jLabel15.setFont(resourceMap.getFont("jLabel15.font")); // NOI18N
        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jLabel16.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jLabel17.setFont(resourceMap.getFont("jLabel17.font")); // NOI18N
        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        jLabel18.setFont(resourceMap.getFont("jLabel18.font")); // NOI18N
        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        txttricepsder.setEditable(false);
        txttricepsder.setFont(resourceMap.getFont("txttricepsder.font")); // NOI18N
        txttricepsder.setName("txttricepsder"); // NOI18N

        txtbicepsder.setEditable(false);
        txtbicepsder.setFont(resourceMap.getFont("txtbicepsder.font")); // NOI18N
        txtbicepsder.setName("txtbicepsder"); // NOI18N

        txtCuadricepsDer.setEditable(false);
        txtCuadricepsDer.setFont(resourceMap.getFont("txtCuadricepsDer.font")); // NOI18N
        txtCuadricepsDer.setName("txtCuadricepsDer"); // NOI18N

        txtIzquiotibialDer.setEditable(false);
        txtIzquiotibialDer.setFont(resourceMap.getFont("txtIzquiotibialDer.font")); // NOI18N
        txtIzquiotibialDer.setName("txtIzquiotibialDer"); // NOI18N

        txttriceptsizq.setEditable(false);
        txttriceptsizq.setFont(resourceMap.getFont("txttriceptsizq.font")); // NOI18N
        txttriceptsizq.setName("txttriceptsizq"); // NOI18N
        txttriceptsizq.setPreferredSize(new java.awt.Dimension(6, 30));

        txtbicepsizq.setEditable(false);
        txtbicepsizq.setFont(resourceMap.getFont("txtbicepsizq.font")); // NOI18N
        txtbicepsizq.setName("txtbicepsizq"); // NOI18N

        txtCuadricepsIzq.setEditable(false);
        txtCuadricepsIzq.setFont(resourceMap.getFont("txtCuadricepsIzq.font")); // NOI18N
        txtCuadricepsIzq.setName("txtCuadricepsIzq"); // NOI18N

        txtIzquiotibialIzq.setEditable(false);
        txtIzquiotibialIzq.setFont(resourceMap.getFont("txtIzquiotibialIzq.font")); // NOI18N
        txtIzquiotibialIzq.setName("txtIzquiotibialIzq"); // NOI18N

        jLabel19.setFont(resourceMap.getFont("jLabel19.font")); // NOI18N
        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        jLabel20.setFont(resourceMap.getFont("jLabel20.font")); // NOI18N
        jLabel20.setForeground(resourceMap.getColor("jLabel20.foreground")); // NOI18N
        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N

        btnFuerza.setText(resourceMap.getString("btnFuerza.text")); // NOI18N
        btnFuerza.setName("btnFuerza"); // NOI18N
        btnFuerza.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFuerzaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(132, 132, 132)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel17)
                            .addComponent(jLabel16)
                            .addComponent(jLabel18)
                            .addComponent(jLabel15)
                            .addComponent(btnFuerza, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(28, 28, 28)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel19)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(txtIzquiotibialDer, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtCuadricepsDer, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtbicepsder, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txttricepsder, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(33, 33, 33)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtIzquiotibialIzq)
                            .addComponent(txtCuadricepsIzq)
                            .addComponent(jLabel20)
                            .addComponent(txtbicepsizq, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txttriceptsizq, javax.swing.GroupLayout.DEFAULT_SIZE, 68, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel19)
                    .addComponent(jLabel20))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel16)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel17)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel18))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                            .addComponent(txttriceptsizq, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtbicepsizq, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(txtCuadricepsIzq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(txtIzquiotibialIzq, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addComponent(txttricepsder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(txtbicepsder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(20, 20, 20)
                            .addComponent(txtCuadricepsDer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(txtIzquiotibialDer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(18, 18, 18)
                .addComponent(btnFuerza, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(584, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

        jPanel2.setBackground(resourceMap.getColor("jPanel2.background")); // NOI18N
        jPanel2.setName("jPanel2"); // NOI18N

        jLabel22.setFont(resourceMap.getFont("jLabel23.font")); // NOI18N
        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N

        txtAltura.setEditable(false);
        txtAltura.setFont(resourceMap.getFont("txtBrazoExtendido.font")); // NOI18N
        txtAltura.setName("txtAltura"); // NOI18N

        txtBrazoExtendido.setEditable(false);
        txtBrazoExtendido.setFont(resourceMap.getFont("txtBrazoExtendido.font")); // NOI18N
        txtBrazoExtendido.setName("txtBrazoExtendido"); // NOI18N

        jLabel23.setFont(resourceMap.getFont("jLabel23.font")); // NOI18N
        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        jLabel24.setFont(resourceMap.getFont("jLabel23.font")); // NOI18N
        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        txtSalto.setEditable(false);
        txtSalto.setFont(resourceMap.getFont("txtBrazoExtendido.font")); // NOI18N
        txtSalto.setName("txtSalto"); // NOI18N

        jLabel25.setFont(resourceMap.getFont("jLabel23.font")); // NOI18N
        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
        jLabel25.setName("jLabel25"); // NOI18N

        txtReaccion.setFont(resourceMap.getFont("txtBrazoExtendido.font")); // NOI18N
        txtReaccion.setName("txtReaccion"); // NOI18N

        btnSaltabilidad.setText(resourceMap.getString("btnSaltabilidad.text")); // NOI18N
        btnSaltabilidad.setName("btnSaltabilidad"); // NOI18N
        btnSaltabilidad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaltabilidadActionPerformed(evt);
            }
        });

        jLabel21.setIcon(resourceMap.getIcon("jLabel21.icon")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(130, 130, 130)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSaltabilidad, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel24)
                            .addComponent(jLabel23)
                            .addComponent(jLabel25)
                            .addComponent(jLabel22))
                        .addGap(28, 28, 28)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtReaccion, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtSalto, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtBrazoExtendido, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtAltura, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(382, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(208, 208, 208)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel22)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel23)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel24)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel25))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(txtAltura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(txtBrazoExtendido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(20, 20, 20)
                        .addComponent(txtSalto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(txtReaccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(btnSaltabilidad, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(622, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addComponent(jLabel21)
                    .addContainerGap(900, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        jPanel1.setBackground(resourceMap.getColor("jPanel1.background")); // NOI18N
        jPanel1.setName("jPanel1"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jLabel6.setIcon(resourceMap.getIcon("jLabel6.icon")); // NOI18N
        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel10.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jLabel11.setFont(resourceMap.getFont("jLabel11.font")); // NOI18N
        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jLabel12.setFont(resourceMap.getFont("jLabel12.font")); // NOI18N
        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jLabel13.setFont(resourceMap.getFont("jLabel13.font")); // NOI18N
        jLabel13.setForeground(resourceMap.getColor("jLabel13.foreground")); // NOI18N
        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        btnVelocidad.setText(resourceMap.getString("btnVelocidad.text")); // NOI18N
        btnVelocidad.setName("btnVelocidad"); // NOI18N
        btnVelocidad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVelocidadActionPerformed(evt);
            }
        });

        txt10Metros.setEditable(false);
        txt10Metros.setFont(resourceMap.getFont("txt10Metros.font")); // NOI18N
        txt10Metros.setText(resourceMap.getString("txt10Metros.text")); // NOI18N
        txt10Metros.setName("txt10Metros"); // NOI18N
        txt10Metros.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txt10MetrosKeyTyped(evt);
            }
        });

        txt20Metros.setEditable(false);
        txt20Metros.setFont(resourceMap.getFont("txt20Metros.font")); // NOI18N
        txt20Metros.setText(resourceMap.getString("txt20Metros.text")); // NOI18N
        txt20Metros.setName("txt20Metros"); // NOI18N

        txt30Metros.setEditable(false);
        txt30Metros.setFont(resourceMap.getFont("txt30Metros.font")); // NOI18N
        txt30Metros.setText(resourceMap.getString("txt30Metros.text")); // NOI18N
        txt30Metros.setName("txt30Metros"); // NOI18N

        txt50Metros.setEditable(false);
        txt50Metros.setFont(resourceMap.getFont("txt50Metros.font")); // NOI18N
        txt50Metros.setName("txt50Metros"); // NOI18N

        txt40Metros.setEditable(false);
        txt40Metros.setFont(resourceMap.getFont("txt40Metros.font")); // NOI18N
        txt40Metros.setName("txt40Metros"); // NOI18N

        jLabel26.setIcon(resourceMap.getIcon("jLabel26.icon")); // NOI18N
        jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
        jLabel26.setToolTipText(resourceMap.getString("jLabel26.toolTipText")); // NOI18N
        jLabel26.setName("jLabel26"); // NOI18N

        jLabel27.setIcon(resourceMap.getIcon("jLabel27.icon")); // NOI18N
        jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
        jLabel27.setName("jLabel27"); // NOI18N

        jLabel28.setIcon(resourceMap.getIcon("jLabel28.icon")); // NOI18N
        jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
        jLabel28.setName("jLabel28"); // NOI18N

        jLabel29.setIcon(resourceMap.getIcon("jLabel29.icon")); // NOI18N
        jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
        jLabel29.setName("jLabel29"); // NOI18N

        jLabel30.setIcon(resourceMap.getIcon("jLabel30.icon")); // NOI18N
        jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
        jLabel30.setName("jLabel30"); // NOI18N

        jLabel31.setIcon(resourceMap.getIcon("jLabel31.icon")); // NOI18N
        jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
        jLabel31.setName("jLabel31"); // NOI18N

        jLabel32.setIcon(resourceMap.getIcon("jLabel32.icon")); // NOI18N
        jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
        jLabel32.setName("jLabel32"); // NOI18N

        jLabel33.setIcon(resourceMap.getIcon("jLabel33.icon")); // NOI18N
        jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
        jLabel33.setName("jLabel33"); // NOI18N

        jLabel34.setIcon(resourceMap.getIcon("jLabel34.icon")); // NOI18N
        jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
        jLabel34.setName("jLabel34"); // NOI18N

        jLabel35.setIcon(resourceMap.getIcon("jLabel35.icon")); // NOI18N
        jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
        jLabel35.setName("jLabel35"); // NOI18N

        habilitadocono2.setBackground(resourceMap.getColor("habilitadocono2.background")); // NOI18N
        habilitadocono2.setSelected(true);
        habilitadocono2.setText(resourceMap.getString("habilitadocono2.text")); // NOI18N
        habilitadocono2.setName("habilitadocono2"); // NOI18N

        habilitadocono3.setBackground(resourceMap.getColor("habilitadocono3.background")); // NOI18N
        habilitadocono3.setSelected(true);
        habilitadocono3.setText(resourceMap.getString("habilitadocono3.text")); // NOI18N
        habilitadocono3.setName("habilitadocono3"); // NOI18N

        habilitadocono4.setBackground(resourceMap.getColor("habilitadocono4.background")); // NOI18N
        habilitadocono4.setSelected(true);
        habilitadocono4.setText(resourceMap.getString("habilitadocono4.text")); // NOI18N
        habilitadocono4.setName("habilitadocono4"); // NOI18N

        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jLabel9.setFont(resourceMap.getFont("jLabel9.font")); // NOI18N
        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        habilitadocono1.setBackground(resourceMap.getColor("habilitadocono1.background")); // NOI18N
        habilitadocono1.setSelected(true);
        habilitadocono1.setText(resourceMap.getString("habilitadocono1.text")); // NOI18N
        habilitadocono1.setName("habilitadocono1"); // NOI18N

        jLabel36.setBackground(resourceMap.getColor("jLabel36.background")); // NOI18N
        jLabel36.setFont(resourceMap.getFont("jLabel36.font")); // NOI18N
        jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
        jLabel36.setName("jLabel36"); // NOI18N

        distanciacono1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        distanciacono1.setText(resourceMap.getString("distanciacono1.text")); // NOI18N
        distanciacono1.setToolTipText(resourceMap.getString("distanciacono1.toolTipText")); // NOI18N
        distanciacono1.setName("distanciacono1"); // NOI18N
        distanciacono1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                distanciacono1KeyTyped(evt);
            }
        });

        distanciacono2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        distanciacono2.setText(resourceMap.getString("distanciacono2.text")); // NOI18N
        distanciacono2.setName("distanciacono2"); // NOI18N
        distanciacono2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                distanciacono2KeyTyped(evt);
            }
        });

        distanciacono3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        distanciacono3.setText(resourceMap.getString("distanciacono3.text")); // NOI18N
        distanciacono3.setName("distanciacono3"); // NOI18N
        distanciacono3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                distanciacono3KeyTyped(evt);
            }
        });

        distanciacono4.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        distanciacono4.setText(resourceMap.getString("distanciacono4.text")); // NOI18N
        distanciacono4.setName("distanciacono4"); // NOI18N
        distanciacono4.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                distanciacono4KeyTyped(evt);
            }
        });

        distanciacono5.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        distanciacono5.setText(resourceMap.getString("distanciacono5.text")); // NOI18N
        distanciacono5.setName("distanciacono5"); // NOI18N
        distanciacono5.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                distanciacono5KeyTyped(evt);
            }
        });

        jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
        jLabel37.setName("jLabel37"); // NOI18N

        jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
        jLabel38.setName("jLabel38"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(88, 88, 88))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(habilitadocono2)
                    .addComponent(habilitadocono3)
                    .addComponent(habilitadocono4)
                    .addComponent(habilitadocono1))
                .addGap(15, 15, 15)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel30))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(41, 41, 41)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel12)
                            .addComponent(jLabel11)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel9)
                                .addComponent(jLabel10)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel26)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel27)
                                    .addComponent(jLabel28))
                                .addComponent(jLabel29)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txt50Metros)
                    .addComponent(txt40Metros)
                    .addComponent(txt30Metros)
                    .addComponent(txt20Metros)
                    .addComponent(txt10Metros, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel34)
                    .addComponent(jLabel33)
                    .addComponent(jLabel32)
                    .addComponent(jLabel31)
                    .addComponent(jLabel35))
                .addGap(28, 28, 28)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(distanciacono5)
                    .addComponent(distanciacono4)
                    .addComponent(distanciacono3)
                    .addComponent(distanciacono2)
                    .addComponent(distanciacono1, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE))
                .addContainerGap(257, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(332, 332, 332)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel38)
                        .addGap(137, 137, 137)
                        .addComponent(jLabel36))
                    .addComponent(jLabel2))
                .addContainerGap(234, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(298, 298, 298)
                .addComponent(btnVelocidad, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 252, Short.MAX_VALUE)
                .addComponent(jButton4)
                .addGap(147, 147, 147))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jLabel37)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(76, 76, 76)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(44, 44, 44)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jLabel9)
                                                    .addComponent(habilitadocono1)))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(18, 18, 18)
                                                .addComponent(txt10Metros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(jLabel26))
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(18, 18, 18)
                                                .addComponent(jLabel27))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(36, 36, 36)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jLabel10)
                                                    .addComponent(habilitadocono2)))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(36, 36, 36)
                                                .addComponent(txt20Metros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(18, 18, 18)
                                                .addComponent(jLabel28))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(26, 26, 26)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jLabel11)
                                                    .addComponent(habilitadocono3)))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(36, 36, 36)
                                                .addComponent(txt30Metros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(18, 18, 18)
                                                .addComponent(jLabel29))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(25, 25, 25)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jLabel12)
                                                    .addComponent(habilitadocono4)))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(31, 31, 31)
                                                .addComponent(txt40Metros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(31, 31, 31)
                                                .addComponent(jLabel13))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(30, 30, 30)
                                                .addComponent(txt50Metros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGap(18, 18, 18)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jLabel35)
                                                    .addComponent(jLabel30)))))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel31)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel32)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel33)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel34))))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(49, 49, 49)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel36)
                                    .addComponent(jLabel38))
                                .addGap(34, 34, 34)
                                .addComponent(distanciacono1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(71, 71, 71)
                                .addComponent(distanciacono2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(70, 70, 70)
                                .addComponent(distanciacono3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(73, 73, 73)
                                .addComponent(distanciacono4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(61, 61, 61)
                                .addComponent(distanciacono5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(23, 23, 23)
                        .addComponent(btnVelocidad, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jButton4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel37, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(263, 263, 263))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        ddPruebas.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "-Seleccione-", "Velocidad", "Fuerza", "Saltabilidad" }));
        ddPruebas.setName("ddPruebas"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        txtParticipante.setFont(resourceMap.getFont("txtParticipante.font")); // NOI18N
        txtParticipante.setText(resourceMap.getString("txtParticipante.text")); // NOI18N
        txtParticipante.setName("txtParticipante"); // NOI18N

        txtNombreParticipante.setFont(resourceMap.getFont("txtNombreParticipante.font")); // NOI18N
        txtNombreParticipante.setText(resourceMap.getString("txtNombreParticipante.text")); // NOI18N
        txtNombreParticipante.setName("txtNombreParticipante"); // NOI18N

        ddPuerto.setName("ddPuerto"); // NOI18N
        ddPuerto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ddPuertoActionPerformed(evt);
            }
        });

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N
        jButton5.setName("jButton5"); // NOI18N
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        txtParticipante1.setFont(resourceMap.getFont("txtParticipante1.font")); // NOI18N
        txtParticipante1.setText(resourceMap.getString("txtParticipante1.text")); // NOI18N
        txtParticipante1.setName("txtParticipante1"); // NOI18N

        lblError.setFont(resourceMap.getFont("lblError.font")); // NOI18N
        lblError.setForeground(resourceMap.getColor("lblError.foreground")); // NOI18N
        lblError.setText(resourceMap.getString("lblError.text")); // NOI18N
        lblError.setName("lblError"); // NOI18N

        progressBar.setName("progressBar"); // NOI18N

        javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
        mainPanel.setLayout(mainPanelLayout);
        mainPanelLayout.setHorizontalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainPanelLayout.createSequentialGroup()
                .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(mainPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel4)
                            .addComponent(jLabel7)
                            .addComponent(jLabel14))
                        .addGap(79, 79, 79)
                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(mainPanelLayout.createSequentialGroup()
                                .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtCedula, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(mainPanelLayout.createSequentialGroup()
                                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtPull, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(ddPruebas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(52, 52, 52)
                                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(mainPanelLayout.createSequentialGroup()
                                                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(ddTurnos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(26, 26, 26)
                                                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jButton2)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(txtEnsayo, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                                .addGap(36, 36, 36)
                                .addComponent(jButton3)
                                .addGap(74, 74, 74)
                                .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(mainPanelLayout.createSequentialGroup()
                                .addComponent(ddPuerto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 631, Short.MAX_VALUE)
                                .addComponent(lblError, javax.swing.GroupLayout.PREFERRED_SIZE, 509, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(31, 31, 31)
                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(mainPanelLayout.createSequentialGroup()
                                .addComponent(txtParticipante1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtParticipante, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(txtNombreParticipante))
                        .addGap(109, 109, 109))
                    .addGroup(mainPanelLayout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 605, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 784, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(43, 43, 43)
                        .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(14, Short.MAX_VALUE))
        );
        mainPanelLayout.setVerticalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainPanelLayout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(mainPanelLayout.createSequentialGroup()
                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(txtCedula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(txtPull, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(ddPruebas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(txtParticipante, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ddTurnos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)
                            .addComponent(jButton2)
                            .addComponent(txtEnsayo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtParticipante1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(ddPuerto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblError, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtNombreParticipante)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(mainPanelLayout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTabbedPane1)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1086, Short.MAX_VALUE)))
                    .addGroup(mainPanelLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        menuBar.setName("menuBar"); // NOI18N

        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(desktopapplication1.DesktopApplication1.class).getContext().getActionMap(DesktopApplication1View.class, this);
        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        statusPanel.setName("statusPanel"); // NOI18N

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1761, Short.MAX_VALUE)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 1781, Short.MAX_VALUE)
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel))
                .addGap(3, 3, 3))
        );

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed


        calendario.add(Calendar.DATE, 1);
        ponerFecha();
        //           int dia = calendario.get(Calendar.DAY_OF_MONTH);
        //        int mes = calendario.get(Calendar.MONTH);
        //        int ano = calendario.get(Calendar.YEAR);
        //
        //        txtEnsayo.setText("" + dia + "-" + (mes+1) + "-" + ano + "-" + "");
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed


        calendario.add(Calendar.DATE, -1);
        ponerFecha();

    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:


        verConsultas();

    }//GEN-LAST:event_jButton1ActionPerformed

    private void btnVelocidadActionPerformed(java.awt.event.ActionEvent evt) {                                             
        //valido campos

        
       if ((txt10Metros.getText().length() <= 0) && (habilitadocono1.isSelected())){
            lblError.setText("No se encuentran resultados para los primeros conos, \n o no estan seleccionados, estos se promediaran");
            return;
        }

        if ((txt20Metros.getText().length() <= 0) && (habilitadocono2.isSelected())) {
            lblError.setText("No se encuentran resultados para los segundos conos");
            return;
        }
        if ((txt30Metros.getText().length() <= 0) && (habilitadocono3.isSelected())){
            lblError.setText("No se encuentran resultados para los terceros conos");
            return;
        }
        if ((txt40Metros.getText().length() <= 0) && (habilitadocono4.isSelected())){
            lblError.setText("No se encuentran resultados para los cuartos conos");
            return;
        }
        if (txt50Metros.getText().length() <= 0) {
            lblError.setText("No se encuentran resultados para ultimos conos");
            return;
        }

         if 
            (distanciacono1.getText().length() <= 0) {
            lblError.setText("No ha ingresado la distancia para el primer par de conos");
            return;
        }
        if (distanciacono2.getText().length() <= 0) {
            lblError.setText("No ha ingresado la distancia para el segundo par de conos");
            return;
        }
        if (distanciacono3.getText().length() <= 0) {
            lblError.setText("No ha ingresado la distancia para el tercer par de conos");
            return;
        }
        if (distanciacono4.getText().length() <= 0) {
            lblError.setText("No ha ingresado la distancia para el cuarto par de conos");
            return;
        }
        if (distanciacono5.getText().length() <= 0) {
            lblError.setText("No ha ingresado la distancia para el quinto par de conos");
            return;
        }
        
        IngresarConsulta();
        
        FachadaConsulta oFachadaConsulta = new FachadaConsulta();        
        Consulta idConsulta = oFachadaConsulta.obtenerConsulta(idPull, idEvaluacionPaciente);
        
        CaracteristicasConsulta oCaracteristicasConsulta = new CaracteristicasConsulta();
        
      
       // oCaracteristicasConsulta.setId_caracteristica("2273");
        oCaracteristicasConsulta.setCalificacion(txt10Metros.getText());
        oCaracteristicasConsulta.setIdConsulta(idConsulta.getIdConsulta());
        oCaracteristicasConsulta.setIdEvaluacionPaciente(idEvaluacionPaciente);

       
        if(!habilitadocono1.isSelected()) {
                
              oCaracteristicasConsulta.setId_caracteristica("2273");      
             // lblError.setText("No ha habilitado el cono 1, este sera promediado");
              int segundose = 00;
              String segundos = Integer.toString(segundose);
              segundos = segundos.replace(":", ".");
              oCaracteristicasConsulta.setCalificacion(segundos);
              if (!ingresar(oCaracteristicasConsulta)) {
                return; } } 
         else   {      
               oCaracteristicasConsulta.setId_caracteristica("2273");      
              String segundos = txt10Metros.getText();
              segundos = segundos.replace(":", ".");
            //  String minutos = txt10Metros.getText().substring(2);
              oCaracteristicasConsulta.setCalificacion(segundos);
              if (!ingresar(oCaracteristicasConsulta)) {
              return;
                }}   



        if    (!habilitadocono2.isSelected()) {
              oCaracteristicasConsulta.setId_caracteristica("2274");      
              //lblError.setText("No ha habilitado el cono 2, este sera promediado"); 
              int segundose = 00;
              String segundos = Integer.toString(segundose);
              segundos = segundos.replace(":", ".");
              oCaracteristicasConsulta.setCalificacion(segundos);
              if (!ingresar(oCaracteristicasConsulta)) {
                return; } } 
         else   {
            oCaracteristicasConsulta.setId_caracteristica("2274");      
            String segundos = txt20Metros.getText();
            segundos = segundos.replace(":", ".");
           // String minutos = segundos.replace(":", "."); con esta linea se ponen los : puntos en la table
            //ejemplo 1:30:478
             oCaracteristicasConsulta.setCalificacion(segundos);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                }}   


 
        if    (!habilitadocono3.isSelected()) {
              oCaracteristicasConsulta.setId_caracteristica("2275");      
             // lblError.setText("No ha habilitado el cono 3, este sera promediado"); 
              int segundose = 00;
              String segundos = Integer.toString(segundose);
              segundos = segundos.replace(":", ".");
              oCaracteristicasConsulta.setCalificacion(segundos);
              if (!ingresar(oCaracteristicasConsulta)) {
                return; } } 
         else   {
             oCaracteristicasConsulta.setId_caracteristica("2275"); 
             String segundos = txt30Metros.getText();     
             segundos = segundos.replace(":", ".");
             oCaracteristicasConsulta.setCalificacion(segundos);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                }}   

 
        if    (!habilitadocono4.isSelected()) {
              oCaracteristicasConsulta.setId_caracteristica("2276");      
           //   lblError.setText("No ha habilitado el cono 4, este sera promediado"); 
              int segundose = 00;
              String segundos = Integer.toString(segundose);
              segundos = segundos.replace(":", ".");
              oCaracteristicasConsulta.setCalificacion(segundos);
              if (!ingresar(oCaracteristicasConsulta)) {
                return; } } 
         else   {   
            oCaracteristicasConsulta.setId_caracteristica("2276");      
            String segundos = txt40Metros.getText();
             segundos = segundos.replace(":", ".");
             oCaracteristicasConsulta.setCalificacion(segundos);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                }}   
            
             oCaracteristicasConsulta.setId_caracteristica("2277");      
             String segundos = txt50Metros.getText();
             segundos = segundos.replace(":", ".");
             oCaracteristicasConsulta.setCalificacion(segundos);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                }    
            
                // Distancias para velocidad
              oCaracteristicasConsulta.setId_caracteristica("2278");      
             String distancia = distanciacono1.getText();
             oCaracteristicasConsulta.setCalificacion(distancia);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                }    
            oCaracteristicasConsulta.setId_caracteristica("2279");      
             distancia = distanciacono2.getText();
             oCaracteristicasConsulta.setCalificacion(distancia);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                }    
            oCaracteristicasConsulta.setId_caracteristica("2280");      
             distancia = distanciacono3.getText();
             oCaracteristicasConsulta.setCalificacion(distancia);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                }   

            oCaracteristicasConsulta.setId_caracteristica("2281");      
             distancia = distanciacono4.getText();
             oCaracteristicasConsulta.setCalificacion(distancia);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                }             
            
            oCaracteristicasConsulta.setId_caracteristica("2282");      
             distancia = distanciacono5.getText();
             oCaracteristicasConsulta.setCalificacion(distancia);
             if (!ingresar(oCaracteristicasConsulta)) {
            return;
                } 
        lblError.setForeground(Color.BLUE);
        lblError.setText("El registro se ingresó satisfactoriamente.");

    }                                             

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        if (!validarCampos()) {
            return;
        }
        int tipoPrueba = ddPruebas.getSelectedIndex();
        jButton5.setEnabled(false);
        Dispositivo oDispositivo = new Dispositivo();
        String resultado = null;
        try {
            resultado = oDispositivo.obtenerPrueba(com);
        } catch (Exception e) {
            lblError.setText("Error de conexión al dispositivo" + e.getMessage());
        }

        switch (tipoPrueba) {

            case 1://Velocidad
                String minutos = resultado.substring(2, 4);
                String segundos = resultado.substring(4, 6);
                String milesimas = resultado.substring(6, 10);
                int min = Integer.parseInt(minutos, 16);
                int seg = Integer.parseInt(segundos, 16);
                int miles = Integer.parseInt(milesimas, 16);
                txt10Metros.setText(min + ":" + seg + ":" + miles);

                minutos = resultado.substring(10, 12);
                segundos = resultado.substring(12, 14);
                milesimas = resultado.substring(14, 18);
                min = Integer.parseInt(minutos, 16);
                seg = Integer.parseInt(segundos, 16);
                miles = Integer.parseInt(milesimas, 16);
                txt20Metros.setText(min + ":" + seg + ":" + miles);

                minutos = resultado.substring(18, 20);
                segundos = resultado.substring(20, 22);
                milesimas = resultado.substring(22, 26);
                min = Integer.parseInt(minutos, 16);
                seg = Integer.parseInt(segundos, 16);
                miles = Integer.parseInt(milesimas, 16);
                txt30Metros.setText(min + ":" + seg + ":" + miles);

                minutos = resultado.substring(26, 28);
                segundos = resultado.substring(28, 30);
                milesimas = resultado.substring(30, 34);
                min = Integer.parseInt(minutos, 16);
                seg = Integer.parseInt(segundos, 16);
                miles = Integer.parseInt(milesimas, 16);
                txt40Metros.setText(min + ":" + seg + ":" + miles);


                minutos = resultado.substring(34, 36);
                segundos = resultado.substring(36, 38);
                milesimas = resultado.substring(38, 42);
                min = Integer.parseInt(minutos, 16);
                seg = Integer.parseInt(segundos, 16);
                miles = Integer.parseInt(milesimas, 16);
                txt50Metros.setText(min + ":" + seg + ":" + miles);
                break;

            case 2: //Fuerza
                String sTricepsDer = getFuerza(2, 6, resultado);
                String sTricepsIzq = getFuerza(6, 10, resultado);
                String sBicepsDer = getFuerza(10, 14, resultado);
                String sBicepsIzq = getFuerza(14, 18, resultado);
                String sCuadricepsDer = getFuerza(18, 22, resultado);
                String sCuadricepsIzq = getFuerza(22, 26, resultado);
                String sIzquiotibialesDer = getFuerza(26, 30, resultado);
                String sIzquiotibialesIzq = getFuerza(30, 34, resultado);

                txttricepsder.setText(sTricepsDer);
                txttriceptsizq.setText(sTricepsIzq);
                txtbicepsder.setText(sBicepsDer);
                txtbicepsizq.setText(sBicepsIzq);
                txtCuadricepsDer.setText(sCuadricepsDer);
                txtCuadricepsIzq.setText(sCuadricepsIzq);
                txtIzquiotibialDer.setText(sIzquiotibialesDer);
                txtIzquiotibialIzq.setText(sIzquiotibialesIzq);

                break;

            case 3: //Saltabilidad
                String sAltura = getSaltabilidad(7, 10, resultado);
                String sBrazoExtendido = getSaltabilidad(15, 18, resultado);
                String sSalto = getSaltabilidad(23, 26, resultado);
                double reaccion = new Double(getSaltabilidad(31, 34, resultado));
                reaccion = reaccion * 100;     
                String sReaccion = redondear(reaccion, 0) +"";
                txtAltura.setText(sAltura);
                txtBrazoExtendido.setText(sBrazoExtendido);
                txtSalto.setText(sSalto);
                txtReaccion.setText(sReaccion.replace(".0", ""));

        }
        jButton5.setEnabled(true);

    }//GEN-LAST:event_jButton5ActionPerformed

    private void ddPuertoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ddPuertoActionPerformed
        // TODO add your handling code here:

        try {
            Parameters settings;
            settings = new Parameters();
            //intance port
            String puerto = ddPuerto.getSelectedItem().toString();
            settings.setPort(puerto);
            settings.setBaudRate("19200");
            //Instance COM1.
            com = new Com(settings);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }//GEN-LAST:event_ddPuertoActionPerformed

    private void btnFuerzaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFuerzaActionPerformed
        // TODO add your handling code here:

        IngresarConsulta();
        FachadaConsulta oFachadaConsulta = new FachadaConsulta();        
        Consulta idConsulta = oFachadaConsulta.obtenerConsulta(idPull, idEvaluacionPaciente);        
        
        CaracteristicasConsulta oCaracteristicasConsulta = new CaracteristicasConsulta();
/*        
        oCaracteristicasConsulta.setCod_especialidad("FS2");
        oCaracteristicasConsulta.setId_especialista(txtCedula.getText());
        oCaracteristicasConsulta.setId_super("2");
        oCaracteristicasConsulta.setId_paciente(txtParticipante.getText());
        oCaracteristicasConsulta.setNro_evaluacion(new BigDecimal(evaluacion));          
 */
        oCaracteristicasConsulta.setId_caracteristica("2265");
        oCaracteristicasConsulta.setCalificacion(txttricepsder.getText());
        oCaracteristicasConsulta.setIdConsulta(idConsulta.getIdConsulta());   
        
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }


        oCaracteristicasConsulta.setId_caracteristica("2266");
        oCaracteristicasConsulta.setCalificacion(txttriceptsizq.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        oCaracteristicasConsulta.setId_caracteristica("2267");
        oCaracteristicasConsulta.setCalificacion(txtbicepsder.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        oCaracteristicasConsulta.setId_caracteristica("2268");
        oCaracteristicasConsulta.setCalificacion(txtbicepsizq.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        oCaracteristicasConsulta.setId_caracteristica("2269");
        oCaracteristicasConsulta.setCalificacion(txtCuadricepsDer.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        oCaracteristicasConsulta.setId_caracteristica("2270");
        oCaracteristicasConsulta.setCalificacion(txtCuadricepsIzq.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        oCaracteristicasConsulta.setId_caracteristica("2271");
        oCaracteristicasConsulta.setCalificacion(txtIzquiotibialDer.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        oCaracteristicasConsulta.setId_caracteristica("2272");
        oCaracteristicasConsulta.setCalificacion(txtIzquiotibialIzq.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }


    }//GEN-LAST:event_btnFuerzaActionPerformed

    private void btnSaltabilidadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaltabilidadActionPerformed

        IngresarConsulta();
        
        FachadaConsulta oFachadaConsulta = new FachadaConsulta();        
        Consulta idConsulta = oFachadaConsulta.obtenerConsulta(idPull, idEvaluacionPaciente);

        CaracteristicasConsulta oCaracteristicasConsulta = new CaracteristicasConsulta();
//        oCaracteristicasConsulta.setCod_especialidad("FS2");
//        oCaracteristicasConsulta.setId_especialista(txtCedula.getText());
//        oCaracteristicasConsulta.setId_super("1");
//        oCaracteristicasConsulta.setId_paciente(txtParticipante.getText());
//        oCaracteristicasConsulta.setNro_evaluacion(new BigDecimal(evaluacion));
        oCaracteristicasConsulta.setId_caracteristica("2260");
        oCaracteristicasConsulta.setCalificacion(txtAltura.getText());
        oCaracteristicasConsulta.setIdConsulta(idConsulta.getIdConsulta());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }


        oCaracteristicasConsulta.setId_caracteristica("2261");
        oCaracteristicasConsulta.setCalificacion(txtBrazoExtendido.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        oCaracteristicasConsulta.setId_caracteristica("2262");
        oCaracteristicasConsulta.setCalificacion(txtSalto.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        oCaracteristicasConsulta.setId_caracteristica("2263");
        oCaracteristicasConsulta.setCalificacion(txtReaccion.getText());
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

        double salto = new Double(txtSalto.getText());
        double brazoExtendido = new Double(txtBrazoExtendido.getText());
        double saltabilidad = salto - brazoExtendido;
        oCaracteristicasConsulta.setId_caracteristica("Saltab");
        oCaracteristicasConsulta.setCalificacion(String.valueOf(redondear(saltabilidad,2)));
        if (!ingresarFuerza(oCaracteristicasConsulta)) {
            return;
        }

    }//GEN-LAST:event_btnSaltabilidadActionPerformed

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
// TODO add your handling code here:
    System.exit(0);
}//GEN-LAST:event_jButton4ActionPerformed

private void txt10MetrosKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt10MetrosKeyTyped
// TODO add your handling code here:
}//GEN-LAST:event_txt10MetrosKeyTyped

private void distanciacono1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_distanciacono1KeyTyped
if(!Character.isDigit(evt.getKeyChar()) && !Character.isISOControl(evt.getKeyChar()))
{
     Toolkit.getDefaultToolkit().beep();
     evt.consume();
 }// TODO add your handling code here:
}//GEN-LAST:event_distanciacono1KeyTyped

private void distanciacono2KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_distanciacono2KeyTyped
if(!Character.isDigit(evt.getKeyChar()) && !Character.isISOControl(evt.getKeyChar()))
{
     Toolkit.getDefaultToolkit().beep();
     evt.consume();
 }// TODO add your handling code here:
}//GEN-LAST:event_distanciacono2KeyTyped

private void distanciacono3KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_distanciacono3KeyTyped
if(!Character.isDigit(evt.getKeyChar()) && !Character.isISOControl(evt.getKeyChar()))
{
     Toolkit.getDefaultToolkit().beep();
     evt.consume();
 }// TODO add your handling code here:
}//GEN-LAST:event_distanciacono3KeyTyped

private void distanciacono4KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_distanciacono4KeyTyped

    if(!Character.isDigit(evt.getKeyChar()) && !Character.isISOControl(evt.getKeyChar()))
{
     Toolkit.getDefaultToolkit().beep();
     evt.consume();
 }// TODO add your handling code here:
}//GEN-LAST:event_distanciacono4KeyTyped

private void distanciacono5KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_distanciacono5KeyTyped
if(!Character.isDigit(evt.getKeyChar()) && !Character.isISOControl(evt.getKeyChar()))
{
     Toolkit.getDefaultToolkit().beep();
     evt.consume();
 }// TODO add your handling code here:
}//GEN-LAST:event_distanciacono5KeyTyped

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnFuerza;
    private javax.swing.JButton btnSaltabilidad;
    private javax.swing.JButton btnVelocidad;
    private javax.swing.JComboBox ddPruebas;
    private javax.swing.JComboBox ddPuerto;
    private javax.swing.JComboBox ddTurnos;
    private javax.swing.JTextField distanciacono1;
    private javax.swing.JTextField distanciacono2;
    private javax.swing.JTextField distanciacono3;
    private javax.swing.JTextField distanciacono4;
    private javax.swing.JTextField distanciacono5;
    private javax.swing.JCheckBox habilitadocono1;
    private javax.swing.JCheckBox habilitadocono2;
    private javax.swing.JCheckBox habilitadocono3;
    private javax.swing.JCheckBox habilitadocono4;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel lblError;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    private javax.swing.JTable tableConsultas;
    private javax.swing.JTextField txt10Metros;
    private javax.swing.JTextField txt20Metros;
    private javax.swing.JTextField txt30Metros;
    private javax.swing.JTextField txt40Metros;
    private javax.swing.JTextField txt50Metros;
    private javax.swing.JTextField txtAltura;
    private javax.swing.JTextField txtBrazoExtendido;
    private javax.swing.JTextField txtCedula;
    private javax.swing.JTextField txtCuadricepsDer;
    private javax.swing.JTextField txtCuadricepsIzq;
    private javax.swing.JTextField txtEnsayo;
    private javax.swing.JTextField txtIzquiotibialDer;
    private javax.swing.JTextField txtIzquiotibialIzq;
    private javax.swing.JLabel txtNombreParticipante;
    private javax.swing.JLabel txtParticipante;
    private javax.swing.JLabel txtParticipante1;
    private javax.swing.JTextField txtPull;
    private javax.swing.JTextField txtReaccion;
    private javax.swing.JTextField txtSalto;
    private javax.swing.JTextField txtbicepsder;
    private javax.swing.JTextField txtbicepsizq;
    private javax.swing.JTextField txttricepsder;
    private javax.swing.JTextField txttriceptsizq;
    // End of variables declaration//GEN-END:variables
    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;
    private JDialog aboutBox;

    private void verConsultas() {



        FachadaCita oFachadaCita = new FachadaCita();
/*        
        calendario.set(Calendar.YEAR, 2012);
        calendario.set(Calendar.MONTH, 10);
        calendario.set(Calendar.DATE, 29);
*/
        Date hoy = new java.sql.Date(calendario.getTime().getTime());
        pacientesxDia = oFachadaCita.findByPacienteEval(
                hoy,
                ddTurnos.getSelectedIndex() + "",
                txtPull.getText(),
                txtCedula.getText());


        //definir valores de filas
        Vector colNames = new Vector(5);
        colNames.addElement("Identificación");
        colNames.addElement("Apellidos");
        colNames.addElement("Nombres");
        colNames.addElement("Institución");
        colNames.addElement("Pull");
        colNames.addElement("EvaluacionPaciente");        


        //llenar la tabla
        Vector rows = new Vector();
        for (int i = 0; i < pacientesxDia.size(); i++) {//oRevisiones.size();
            ConsultaCita oConsulta = pacientesxDia.get(i);
            Vector row = new Vector();
            row.addElement(oConsulta.getIdUsuario());
            row.addElement(oConsulta.getNombres());
            row.addElement(oConsulta.getApellido());
            row.addElement(oConsulta.getInstitucion());
            row.addElement(oConsulta.getIdPull());
            row.addElement(oConsulta.getIdEvaluacionPaciente());            

            rows.addElement(row);
        }

        //Instanciar el modelo de tabla

        DefaultTableModel model = new DefaultTableModel(rows, colNames);
        tableConsultas.setModel(model);
        tableConsultas.removeColumn(tableConsultas.getColumnModel().getColumn(4));
        tableConsultas.removeColumn(tableConsultas.getColumnModel().getColumn(4));        
        //seleccion de filas
        tableConsultas.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

        ListSelectionModel rowSM = tableConsultas.getSelectionModel();

        rowSM.addListSelectionListener(new ListSelectionListener() {

            public void valueChanged(ListSelectionEvent e) {
                ListSelectionModel lsm = (ListSelectionModel) e.getSource();
                if (lsm.isSelectionEmpty()) {
                    System.out.println("no filas seleccionadas");
                    //no rows are selected
                } else {
                    int selectedRow = lsm.getMinSelectionIndex();
                    ///selectedRow is selected
                    System.out.println("Fila seleccionadaaaa " + selectedRow);
//                    jTabbedPane1.setSelectedIndex(ddPruebas.getSelectedIndex() + 1);
                    ConsultaCita oConsulta = pacientesxDia.get(selectedRow);
                    txtParticipante.setText(oConsulta.getIdUsuario());
                    txtNombreParticipante.setText(oConsulta.getApellido() + " " + oConsulta.getNombres());
                    evaluacion = Integer.parseInt(oConsulta.getEvaluacion());
                    idPull = oConsulta.getIdPull();
                    System.out.println("Pull " + oConsulta.getIdPull());
                    idEvaluacionPaciente = oConsulta.getIdEvaluacionPaciente();
                    System.out.println("Evaluacion Paciente " + oConsulta.getIdEvaluacionPaciente());                    
                }
            }
        });
    }

    public java.sql.Date fechaMenos(java.sql.Date fch, int dias) {
        Calendar cal = new GregorianCalendar();
        cal.setTimeInMillis(fch.getTime());
        cal.add(Calendar.DATE, -dias);
        return new Date(cal.getTimeInMillis());
    }

    public java.sql.Date fechaMas(java.sql.Date fch, int dias) {
        Calendar cal = new GregorianCalendar();
        cal.setTimeInMillis(fch.getTime());
        cal.add(Calendar.DATE, dias);
        return new Date(cal.getTimeInMillis());
    }

    private void ponerFecha() {
  
        int dia = calendario.get(Calendar.DAY_OF_MONTH);
        int mes = calendario.get(Calendar.MONTH);
        int ano = calendario.get(Calendar.YEAR);       
        
        txtEnsayo.setText("" + dia + "-" + (mes + 1) + "-" + ano);
    }

    private boolean ingresar(CaracteristicasConsulta oCaracteristica) {
        FachadaFisico1 oFachadaFisico1 = new FachadaFisico1();
        String sResultado = oFachadaFisico1.insertarPrueba50m(oCaracteristica);
        if (sResultado != null) {
            if (sResultado.equals("1")) {
                lblError.setVisible(true);
                lblError.setText("El registro fue actualizado con éxito");
            }
            if (sResultado.equals("2")) {
                lblError.setVisible(true);
                lblError.setText("Ocurrio un error al ingresar el registro, consultar al administrador del sistema" + "foreign_key_violation");
            }
            if (sResultado.equals("3")) {
                lblError.setVisible(true);
                lblError.setText("Ocurrio un error al ingresar el registro, consultar al administrador del sistema" + "not_null_violation");
            }
        } else {
            lblError.setVisible(true);

            lblError.setText("El registro ha sido ingresado con exito");
        }

        return true;
    }

    private boolean ingresarFuerza(CaracteristicasConsulta oCaracteristica) {
        FachadaFisico2 oFachadaFisico2 = new FachadaFisico2();
        String sResultado = oFachadaFisico2.insertarSaltabilidad(oCaracteristica);
        if (sResultado != null) {
            if (sResultado.equals("1")) {
                lblError.setVisible(true);
                lblError.setText("El registro fue actualizado con éxito");
            }
            if (sResultado.equals("2")) {
                lblError.setVisible(true);
                lblError.setText("Ocurrio un error al ingresar el registro, consultar al administrador del sistema" + "foreign_key_violation");
            }
            if (sResultado.equals("3")) {
                lblError.setVisible(true);
                lblError.setText("Ocurrio un error al ingresar el registro, consultar al administrador del sistema" + "not_null_violation");
            }
        } else {
            lblError.setVisible(true);
            lblError.setText("El registro ha sido ingresado con exito");
        }

        return true;
    }

    public Double redondear(Double numero, int decimales) {
        return Math.round(numero * Math.pow(10, decimales)) / Math.pow(10, decimales);
    }

    public String getFuerza(int a, int b, String resultado) {
        long value = Long.parseLong(resultado.substring(a, b), 16);
        double d = (double) value;
        d = redondear(d, 2);
        String retorno = (d / 10) + "";
        return retorno;
    }

        public String getSaltabilidad(int a, int b, String resultado) {
        long value = Long.parseLong(resultado.substring(a, b), 16);
        double d = (double) value;
        d = redondear(d, 2);
        String retorno = (d / 100) + "";
        return retorno;
    }

    private boolean validarCampos() {

        if (ddPruebas.getSelectedIndex() == 0) {
            lblError.setText("Debe seleccionar la prueba que desea iniciar");
            jButton5.setEnabled(true);
            return false;
        }

        if (ddPuerto.getSelectedIndex() == 0) {
            lblError.setText("Seleccione el puerto (Ver administrador de dispositivos)");
            jButton5.setEnabled(true);
            return false;
        }
        return true;


    }
}
